import {request} from '../../utils/request.js'
const config = require('../../config.js');
/*** 获取首页数据列表 ***/
export function getIndexList(options) {
    return request({
        url: '/api.php/customer/Home/getList',
        params: options,
    })
}
/*** 获取首页banner ***/
export function getIndexBanner(options) {
    return request({
        url: '/api.php/customer/Active/indexBanner',
        params: options,
    })
}
/*** 获取首页数据 ***/
export function getIndexData(options) {
    return request({
        url: '/api.php/customer/Home/index',
        params: options,
    })
}
/*** 获取用户信息 ***/
export function getMemberInfo(options) {
    return request({
        url: '/api.php/customer/Info/getInfo',
        params: options,
    })
}
/*** 微信授权获取手机号码 ***/
export function getWxDecodePhone(options) {
    return request({
        url: '/api.php/index/Login/phoneDecode',
        params: options,
    })
}
/*** 申请开店 ***/
export function applyOpenShop(options) {
    return request({
        url: '/api.php/customer/info/ApplyStore',
        //session:1,
        params: options,
    })
}
/*** 获取用户地址 ***/
export function getMemberAddress(options){
    return request({
        url: '/api.php/customer/address/lists',
        params: options,
    })
}
/*** 绑定手机 ***/
export function bindPhone(options) {
    return request({
        url: '/api.php/customer/Info/bindPhone',
        params: options,
    })
}
/*** 获取验证码 ***/
//短信类型【1：用户注册，2：修改密码，3：登录异常，4：登录验证，5：身份确认，6：信息变更】
export function getValidateCode(options) {
    return request({
        url: '/api.php/common/AliyunSms/sendCode',
        params: options,
    })
}


/*** 编辑用户地址 ***/
export function eidtMemberAddr(options) {
    return request({
        session: '1',
        url: '/api.php/customer/address/edit',
        params: options,
    })
}
/*** 新增用户地址 ***/
export function addMemberAddr(options) {
    return request({
        session:'1',
        url: '/api.php/customer/address/add',
        params: options,
    })
}

/*** 获取地址详情 ***/
export function getAddrDetail(options) {
    return request({
        url: '/api.php/customer/address/info',
        params: options,
    })
}
/*** 删除地址 ***/
export function delMemberAddr(options) {
    return request({
        url: '/api.php/customer/address/del',
        params: options,
    })
}
/*** 设置默认地址 ***/
export function setDefaultAddr(options) {
    return request({
        url: '/api.php/customer/address/setdefault',
        params: options,
    })
}


/*** 获取收藏列表 ***/
export function getCollectList(options) {
    return request({
        url: '/api.php/customer/behavior/lists',
        params: options,
    })
}
/*** 收藏店铺或手艺人 ***/
export function setCollectItem(options) {
    return request({
        url: '/api.php/customer/behavior/collect',
        params: options,
    })
}
/*** 获取用户优惠券 ***/
export function getTicketList(options) {
    return request({
        url: '/api.php/customer/coupon/lists',
        params: options,
    })
}
/*** 提交建议反馈 ***/
export function postSuggestion(options) {
    return request({
        url: '/api.php/customer/info/postSuggestion',
        params: options,
    })
}

/*** 获取手艺人详情  ***/
export function getCraftsInfo(options) {
    return request({
        url: '/api.php/customer/Home/storeUser',
        params: options,
    })
}
/*** 获取门店详情  ***/
export function getStoreInfo(options) {
    return request({
        url: '/api.php/customer/Home/store',
        params: options,
    })
}

/*** 获取门店和手艺人相关项目详情  ***/
export function getRelationGoods(options) {
    return request({
        url: '/api.php/customer/Home/getGoodsList',
        params: options,
    })
}
/*** 获取项目详情  ***/
export function getItemDetail(options) {
    return request({
        url: '/api.php/customer/goods/info',
        params: options,
    })
}
/*** 获取分类 ***/
export function getCategoryList(options) {
    return request({
        url: '/api.php/customer/Home/getCategory',
        params: options,
    })
}
/*** 计算距离 ***/
export function getDistanceLen(options) {
    return request({
        url: '/api.php/customer/Home/getDistance',
        params: options,
    })
}
/*** 获取商圈 ***/
export function getTradeArea(options) {
    return request({
        url: '/api.php/customer/Home/getCommercialAreaTree',
        params: options,
    })
}
/*** 获取用户订单列表 ***/
export function getOrderList(options) {
    return request({
        url: '/api.php/customer/orders/lists',
        params: options,
    })
}
/*** 提交评价 ***/
export function addOrderEva(options) {
    return request({
        session:'1',
        url: '/api.php/customer/evaluation/add',
        params: options,
    })
}
/*** 获取评价列表 ***/
export function getEvaList(options) {
    return request({
        session: '1',
        url: '/api.php/customer/evaluation/lists',
        params: options,
    })
}
/*** 获取小程序支付参数 ***/
export function getWxpayParams(options) {
    return request({
        session: '1',
        url: '/api.php/customer/orders/pay',
        params: options,
    })
}
/*** 获取预约时间 ***/
export function getAppointTime(options) {
    return request({
        session: '1',
        url: '/api.php/customer/goods/getAppointTime',
        params: options,
    })
}
/*** 修改用户信息 ***/
export function updateMemberInfo(options) {
    return request({
        session: '1',
        url: '/api.php/customer/Info/updateMemberInfo',
        params: options,
    })
}

/*** 创建订单 ***/
export function createGoodsOrder(options) {
    return request({
        url: '/api.php/customer/orders/create',
        params: options,
    })
}
/*** 获取上门订单详情 ***/
export function getVisitOrder(options) {
    return request({
        url: '/api.php/customer/orders/visitOrder',
        params: options,
    })
}
/*** 获取到店订单详情 ***/
export function getArrivalOrder(options) {
    return request({
        url: '/api.php/customer/orders/arrivalOrder',
        params: options,
    })
}
/*** 取消订单 ***/
export function cancelOrder(options) {
    return request({
        url: '/api.php/customer/orders/cancelOrder',
        params: options,
    })
}
/*** 确认服务订单完成 ***/
export function finishOrder(options) {
    return request({
        url: '/api.php/customer/orders/finishService',
        params: options,
    })
}
/*** 修改订单 ***/
export function editOrder(options) {
    return request({
        url: '/api.php/customer/orders/reOrder',
        params: options,
    })
}

/*** 获取下单可用的优惠券 ***/
export function getUseableTicket(options) {
    return request({
        url: '/api.php/customer/coupon/orderToList',
        params: options,
    })
}
/*** 用户退款 ***/
export function refundOrder(options) {
    return request({
        url: '/api.php/customer/Orders/refund',
        params: options,
    })
}
/*** 申请客服介入 ***/
export function askServiceHelp(options) {
    return request({
        url: '/api.php/customer/Orders/applySystemService',
        params: options,
    })
}
/*** 获取订单进度 ***/
export function getOrderStep(options) {
    return request({
        url: '/api.php/customer/Orders/orderProgress',
        params: options,
    })
}
/*** 退款详情 ***/
export function getReturnDetail(options) {
    return request({
        url: '/api.php/customer/Orders/refundOrderProgress',
        params: options,
    })
}
/*** 获取用户参数 ***/
export function getCenterData(options) {
    return request({
        url: '/api.php/customer/Info/center',
        params: options,
    })
}
/*** 获取评价详情 ***/
export function getEvaInfo(options) {
    return request({
        url: '/api.php/customer/evaluation/info',
        params: options,
    })
}
/*** 获取51活动 ***/
export function get51Datq(options) {
    return request({
        url: '/api.php/customer/Active/foActiveList',
        params: options,
    })
}